package com.ocean.controller.library;

import com.ocean.entity.library.Library;
import com.ocean.entity.library.Rule;
import com.ocean.service.library.LibraryService;
import com.ocean.service.library.RuleService;
import com.ocean.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

/**
 * Project：SchoolManage
 * Package：com.ocean.controller.library
 * Author:zy
 * Time:2023/3/3
 */
@RestController
@RequestMapping("/api/library/library")
public class LibraryController {
    @Autowired
    private LibraryService libraryService;


    @PostMapping("save.do")
    public R save(@RequestBody Library library){
        return libraryService.save(library);
    }

    @RequestMapping("querypage.do")
    public R queryPage(int page, int size, String name, String description){
        return libraryService.queryPage(page,size,name,description);
    }

    @GetMapping("del.do")
    public R delete(int id){
        return libraryService.delete(id);
    }

    @PostMapping("update.do")
    public R update(@RequestBody Library library){

        return libraryService.update(library);
    }
}
